home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 2_queries / userhost < prev    next >
Text File  |  2001-03-21  |  2KB  |  58 lines

  1. Synopsis:
  2.    userhost [<nickname> [<nickname> ...] [-cmd <command>]]
  3.  
  4. Description:
  5.    This queries the server for the address (user@hostname) of the given
  6.    nicknames.  Any number of nicknames can be specified.  If no nickname
  7.    is given, the user's is used (this is one way for users to verify
  8.    what address the irc server thinks they have).
  9.  
  10.    USERHOST also allows its output to be used as the input for other
  11.    commands, using the -cmd flag.  When using -cmd, at least one nickname
  12.    is required.  The command can be anything, and multiple commands may
  13.    be used by surrounding them in curly braces.
  14.    
  15.    Also, if all specified nicknames are on common channels with the client,
  16.    /userhost will get the address from an internal list, and never query the
  17.    server. You are still 100% guaranteed to get the right user@host, but
  18.    the AWAY and OPER flags won't always be accurate. If your script depends
  19.    on /userhost for the AWAY and OPER flags, you can use -direct to always
  20.    query the server.
  21.  
  22.    USERHOST passes the following arguments to -cmd:
  23.      $0 - nickname
  24.      $1 - a '+' if the user is an irc operator, a '-' otherwise
  25.      $2 - a '+' if the user is marked as away, a '-' otherwise
  26.      $3 - username
  27.      $4 - hostname
  28.  
  29. Options:
  30.    -cmd      take the output from /userhost as input to other commands
  31.    -direct   force /userhost to query the server
  32.  
  33. Examples:
  34.    To get the userhosts of JoeBob and Jimbo:
  35.       /userhost joebob jimbo
  36.  
  37.    To use their userhost output as another command's input in a script:
  38.       userhost joebob jimbo -cmd {
  39.          echo $0 is $3@$4
  40.          if ( [$1] == [+] ) echo $0 is an irc operator
  41.          if ( [$2] == [+] ) echo $1 is away
  42.       }
  43.  
  44. Aliases:
  45.    HOST is identical in operation to USERHOST.
  46.  
  47. See Also:
  48.    userip(2); Expressions(7)
  49.  
  50. Other Notes:
  51.    The server will only permit 5 nicknames at a time for this command.
  52.    When more than 5 are given, the client will split the command up and
  53.    issue separate queries as needed.  However, most servers enable their
  54.    flood protection after receiving 5 of the same kind of command within
  55.    a short time period.  This means that the user should expect a delay
  56.    in response if more than 25 nicknames are specified.
  57.  
  58.